package com.example8.fenku_fenbiao2.controller;

import com.example8.fenku_fenbiao2.entity.User;
import com.example8.fenku_fenbiao2.mapper.UserMapper;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.web.client.RestClientTest;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author Administrator
 * @description
 * @since 2024-04-11 22:50
 */
@RestClientTest
@RequestMapping("/test")
@RequiredArgsConstructor
public class TestController {

    final UserMapper userMapper;

    @GetMapping("save")
    public void save(){
        for (int i = 0; i < 10; i++) {
            User user = new User();
            user.setName("lhw" + i);
            user.setAge(i);
            userMapper.insert(user);
        }

    }
}
